//
//  TFHttpDataLoad.m
//  Liyadong
//
//  Created by Liyadong on 2019/4/8.
//  Copyright © 2019 Liyadong. All rights reserved.
//

#import "TFHttpDataLoad.h"
#import "TFConfigTool.h"

#import "TFBaseRequest.h"

@implementation TFHttpDataLoad


/** 获取订单轨迹 */
+(void)requetOrderRealRouteWithOrderId:(NSString *)orderId success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
        
 
    NSDictionary *paramDic = @{
                          @"orderId":@([orderId integerValue]),
                          };
    
    NSString *url = [NSString stringWithFormat:@"%@%@",
                     BaseHostUrl,
                     REAL_ROUTE_GPS_POINT_API];
    
    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
    
    
}
 
//
///** 获取优惠券 */
//+(void)requetDiscountListWithMemberId:(NSNumber *)memberId success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//    NSDictionary *paramDic = @{
//                               @"passengerId":memberId
//                               };
//
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathApi,
//                     API_USER_LISTVALIDCOUPONSBYPASSENGER];
//
//    [TFBaseRequest baseGetRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
//
///** 获取司机位置 */
//+ (void)requestDriverPlaceWithDriverId:(NSNumber *)driverId productId:(NSString *)productId orderId:(NSString *)orderId success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *paramDic = @{
//                          @"driverId":driverId,
//                          @"productCategoryId":productId,
//                          @"orderId":@([orderId integerValue]),
//                          };
//
//    NSString *url = [NSString stringWithFormat:@"%@%@",
//                     [TFConfigTool tfRequestHost],
//                     API_USER_GETDRIVERPLACE];
//    [TFBaseRequest basePostJsonRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
///** 用户id,设备与个推id建立绑定关系 */
//+(void)requetPushRelationWithGetuiCid:(NSString *)cid phone:(NSString *)phone Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSString *idfv = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
//    AppDelegate_Tool.deviceIdentifier = idfv;
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"cid":cid,
//                          @"deviceNo":idfv,
//                          @"deviceType":@"IOS",
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"appKey":AppKey,
//
//                               };
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV4,
//                     API_USER_BINDDEVICE];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
///** 获取为我开通的共享账户列表 */
//+ (void)requestClinetForMeWithClinetPhone:(NSString *)clientPhone  Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"appKey":[TFConfigTool tfWechatAppKey],
//                          @"clientPhone":clientPhone,
//                          @"page":[@(0) stringValue],
//                          @"rows":[@(100) stringValue],
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_ACCOUNT_BE_USED_BY_ME];
//
//    [TFBaseRequest baseGetRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
///** 我为ta开通的 */
//+ (void)requestClinetForOtherWithenterpriseId:(NSString *)enterpriseId  Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"appKey":[TFConfigTool tfWechatAppKey],
//                          @"enterpriseId":enterpriseId,
//                          @"page":[@(0) stringValue],
//                          @"rows":[@(100) stringValue],
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_ACCOUNT_BE_USED_FOR_OTHER];
//
//    [TFBaseRequest baseGetRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
//
///** 获取优惠券列表 */
//+(void)requetCouponListWithPhone:(NSString *)phone page:(NSInteger)page Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"appKey":AppKey,
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"page":[@(page) stringValue],
//                          @"limit":[@(20) stringValue]
//                          };
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_COUPONS];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
//
///** 获取账单列表 */
//+(void)requetPayListWithPhone:(NSString *)phone page:(NSInteger)page Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"appKey":AppKey,
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"page":[@(page) stringValue],
//                          @"limit":[@(20) stringValue]
//                          };
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_PAGE_PAYMENTS_BY_MEMBER];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
//
///** 兑换优惠券 */
//+(void)requetCouponWithPhone:(NSString *)phone code:(NSString *)code Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"appKey":AppKey,
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"code":code,
//                          };
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_DUI_HUAN_YOUHUIMA];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
///** 获取钱包充值金额接口 */
//+(void)requetChargeMoneyListWithSuccess:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"appKey":AppKey,
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          };
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_WALLET_INFO];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
///** 支付宝充值 */
//+(void)requetChargeAlipayWithPhone:(NSString *)phone money:(NSString *)money Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"deviceType":@"iphone",
//                          @"money":money,
//                          };
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_ALIPAY_PREPAY];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:dic success:success failure:failure];
//}
//
///** 微信充值 */
//+(void)requetChargeWechatWithPhone:(NSString *)phone money:(NSString *)money Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"phone":phone,
//                          @"deviceType":@"iphone",
//                          @"money":money,
//                          };
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_WEIXIN_PREPAY];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:dic success:success failure:failure];
//}
//
//
//
//
//
//
///** 删除共享账户 */
//+ (void)requestDeleteShareAccountWithAccountID:(NSString *)accountID Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"appKey":[TFConfigTool tfWechatAppKey],
//                          @"timestamp":[TFConfigTool loadTimestamp],
//                          @"id":accountID
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     GET_DELETE_SHARED_ACCOUNT];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
///** 修改紧急联系人 */
//+ (void)requestChangeEcnWithPhone:(NSString *)phone ecnStr:(NSString *)ecnStr ecpStr:(NSString *)ecPStr Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = nil;
//    if (ecnStr.length == 0 || ecPStr.length == 0) {
//        dic = @{
//                @"appKey":[TFConfigTool tfWechatAppKey],
//                @"timestamp":[TFConfigTool loadTimestamp],
//                @"phone":phone,
//                @"memberEcn":@"",
//                @"memberEcp":@""
//                };
//    } else {
//        dic = @{
//                @"appKey":[TFConfigTool tfWechatAppKey],
//                @"timestamp":[TFConfigTool loadTimestamp],
//                @"phone":phone,
//                @"memberEcn":ecnStr,
//                @"memberEcp":ecPStr
//                };
//    }
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:dic];
//    [paramDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     UPDATE_ECN_ECP];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
//
///** 紧急求助 */
//+ (void)requestUrgencyHelpWithCarNumber:(NSString *)carNumber
//                             employName:(NSString *)employName
//                            employPhone:(NSString *)employPhone
//                              showPhone:(NSString *)showPhone
//                              passengerPhone:(NSString *)passengerPhone
//                              employId:(NSString *)employId
//                               startPlace:(NSString *)startPlace
//                               endPlace:(NSString *)endPlace
//                                Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSString *formatStr = [TFLocationTool shareInstance].formattedAddress;
//    if ([NSObject isEmpty:formatStr]) {
//        formatStr = @"";
//    }
//
//    NSDictionary *dic = @{
//                          @"appKey":[TFConfigTool tfWechatAppKey],
//                          @"appId":[TFConfigTool reqWechatAppId],
//                          @"carNumber":carNumber,
//                          @"employName":employName,
//                          @"employPhone":employPhone,
//                          @"showPhone":showPhone,
//                          @"passengerPhone":passengerPhone,
//                          @"employId":employId,
//                          @"formattedAddress":formatStr,
//                          @"startPlace":startPlace,
//                          @"endPlace":endPlace,
//
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool sha256:dic];
//    [paramDic setObject:token forKey:@"sign"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     API_USER_ALARMHELP];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
///** 我已安全 */
//+ (void)requestUrgencySafetyWithCarNumber:(NSString *)carNumber
//                               employName:(NSString *)employName
//                              employPhone:(NSString *)employPhone
//                                showPhone:(NSString *)showPhone
//                           passengerPhone:(NSString *)passengerPhone
//                                 employId:(NSString *)employId
//                                  Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *dic = @{
//                          @"appKey":[TFConfigTool tfWechatAppKey],
//                          @"appId":[TFConfigTool reqWechatAppId],
//                          @"carNumber":carNumber,
//                          @"employName":employName,
//                          @"employPhone":employPhone,
//                          @"showPhone":showPhone,
//                          @"passengerPhone":passengerPhone,
//                          @"employId":employId
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool sha256:dic];
//    [paramDic setObject:token forKey:@"sign"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     API_USER_SAFELY];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
//
//
///** 获得活动列表 */
//+ (void)requestActivityListWithLocation:(CLLocationCoordinate2D)location page:(NSInteger)page success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    CLLocationCoordinate2D coordinate = [TFMapTool locationToBaiduGdLat:location.latitude gdLon:location.longitude];
//
//
//    NSDictionary *dic = @{
//                          @"latitude":[@(coordinate.latitude) stringValue],
//                          @"longitude":[@(coordinate.longitude) stringValue],
//                          @"page":[@(page) stringValue],
//                          @"limit":[@(10) stringValue],
//                          @"appKey":wechatAppkey
//                          };
//
//    NSMutableDictionary *paramDic = [dic mutableCopy];
//    NSString *token = [TFConfigTool sha256:dic];
//    [paramDic setObject:token forKey:@"sign"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathWX,
//                     GET_ACTIVITY];
//    [TFBaseRequest baseGetRequestUrl:url requestParam:paramDic success:success failure:failure];
//
//}
//
//
//
///** 行程外报警 */
//+ (void)requestAlarmHelpNoOrderWithPassengerPhone:(NSString *)passengerPhone
//                                formattedAddress:(NSString *)formattedAddress
//                                  Success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *paramDic = @{
//                          @"passengerPhone":passengerPhone,
//                          @"formattedAddress":formattedAddress,
//                          };
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     ALARM_HELP_NOORDER];
//
//    [TFBaseRequest basePostRequestUrl:url requestParam:paramDic success:success failure:failure];
//}
///** 控制共享账户的开启或者暂停 */
//+(void)requetControlShareAccountWithAccountId:(NSString *)accountId suspendType:(NSString *)suspendType success:(void (^)(id result))success failure:(void (^)(NSError *error))failure {
//
//    NSDictionary *paramDic = @{
//                               @"id":accountId,
//                               @"suspendType":suspendType,
//                               @"timestamp":[TFConfigTool loadTimestamp],
//                               @"appKey":[TFConfigTool tfAppKey]
//                               };
//
//    NSMutableDictionary *muteDic = [paramDic mutableCopy];
//    NSString *token = [TFConfigTool generateToken:paramDic];
//    [muteDic setObject:token forKey:@"token"];
//
//    NSString *url = [NSString stringWithFormat:@"%@%@%@",
//                     [TFConfigTool tfRequestHost],
//                     BaseVersionPathV3,
//                     CONTROL_SHARE_ACCOUNT];
//    [TFBaseRequest basePostRequestUrl:url requestParam:muteDic success:success failure:failure];
//}
//


@end
